<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-model的语法糖</title>
</head>
<body>
    <input type="text"  id="input1" />
    <div id="show"></div>
    <script type="text/javascript">
        let input = document.querySelector("#input1")
        let show = document.querySelector("#show")
        let data = {
            value:''
        }
        input.addEventListener('input',function(e){
            data.value = e.target.value
            show.innerText = data.value
        })
    </script>
</body>
</html>